//
//  AddressBookHelper.h
//  Xiaoqian
//
//  Created by tgf on 13-1-27.
//  Copyright (c) 2013年 tgf. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol AddressBookHelperDelegate;

@interface AddressBookHelper : NSObject

@property(assign, nonatomic)id<AddressBookHelperDelegate> delegate;

- (void)loadContacts;

+ (BOOL)isMobileLike:(NSString *)string;
+ (BOOL)isEmailLike:(NSString *)string;

+ (NSString *)getDigits:(NSString *)string;
+ (NSString *)formatMobile:(NSString *)string;

+ (NSArray *)groupContacts:(NSArray *)contacts;

@end


@protocol AddressBookHelperDelegate <NSObject>

- (void)addressBookHelper:(AddressBookHelper *)helper finishedLoading:(NSArray *)contacts;

@optional
- (void)addressBookHelperError:(AddressBookHelper *)addressBookHelper;
- (void)addressBookHelperDeniedAcess:(AddressBookHelper *)addressBookHelper;

@end